#!/bin/sh

case $1 in
	on)
		xmodmap -e "clear lock"
		xmodmap -e "keycode 0x42 = Escape"
		;;
	off)
		xmodmap -e "keycode 0x42 = Caps_Lock"
		xmodmap -e "add lock = Caps_Lock"
		;;
	*)
		echo "Usage: $0 {on|off} to change with ESC with CAPSLOCK"
		;;
esac
